'''my lib main
some class'''
import math as m
import turtle as t
from tkinter import *
from tkinter.filedialog import *
from time import time
myacsii = {'!':1,'"':2,'#':3,'$':4,'%':5,'&':6,"'":7,'(':8,')':9,'*':10,'+':11,
         ',':12,'-':13,'.':14,'/':15,'0':16,'1':17,'2':18,'3':19,'4':20,'5':21,
         '6':22,'7':23,'8':24,'9':25,':':26,',':27,'<':28,'=':29,'>':30,'?':31,
         '@':32,'A':33,'B':34,'C':35,'D':36,'E':37,'F':38,'G':39,'H':40,'I':41,
         'J':42,'K':43,'L':44,'M':45,'N':46,'O':47,'P':48,'Q':49,'R':50,'S':51,
         'T':52,'U':53,'V':54,'W':55,'X':56,'Y':57,'Z':58,'[':59,'\\':60,']':61,
         '^':62,'_':63,'`':64,'a':65,'b':66,'c':67,'d':68,'e':69,'f':70,'g':71,
         'h':72,'i':73,'j':74,'k':75,'l':76,'m':77,'n':78,'o':79,'p':80,'q':81,
         'r':82,'s':83,'t':84,'u':85,'v':86,'w':87,'x':88,'y':89,'z':90,'{':91,
         '|':92,'}':93,'~':94}

class graph:
    class rectangle:
        def s(l1,l2):
            return l1 * l2
        def c(l1,l2):
            return (l1 + l2) * 2
        def print(l1,l2):
            t.forward(l1)
            t.left(90)
            t.forward(l2)
            t.left(90)
            t.forward(l1)
            t.left(90)
            t.forward(l2)
            t.left(90)
    class Orectangle:
        def __init__(self, lx, ly):
            self.lx = lx
            self.ly = ly
        def s(self):
            return graph.rectangle.s(self.lx, self.ly)
        def v(self):
            return graph.rectangle.v(self.lx, self.ly)
        def print(self):
            graph.rectangle.print(self.lx, self.ly)
    
class times:
    class ORangeTime:
        def __init__(self, starts, ends):
            self.starts = starts
            self.ends = ends
            self.range = ends - starts
            if self.range < 0:
                raise ValueError('range can\'t small to 0')
        def prints(self, ws):
            return round(self.range)
    def strftime1(times):    # %Y-%m-%d %H:%M:%S
        return times.strftime('%Y-%m-%d %H:%M:%S')

def openfilegui():
    to = Tk()
    text = Text(to, width=15, height=1)
    button = Button(to, width=15, height=1)
def sleep(sec):
    from time import sleep
    for i in range(int(sec)):
        sleep(1)

def GetRunTime(func):
    startTime = time()
    value = func()
    endtime = time()
    passtime = endtime - startTime
    return f"{value = } {passtime = :.6f}"

if __name__ == '__main__':
    pass
